body {
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #333;
}

#backgroundOverlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #E3EDCD;
    z-index: -2;
    transition: opacity 1s ease;
}

#backgroundOverlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    z-index: -1;
}

.container {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2),
                0 10px 25px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 90%;
    max-width: 500px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
}

.container:hover {
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2),
                0 8px 20px rgba(0, 0, 0, 0.12);
    border-color: rgba(30, 60, 114, 0.4);
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    pointer-events: none;
}

.container:hover::before {
    opacity: 1;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: opacity 0.3s ease;
}

h1 {
    color: #1e3c72;
    font-size: 2.5em;
    margin-bottom: 30px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

h1 i {
    margin-right: 12px;
    color: #000;
    animation: floatAnimation 3s ease-in-out infinite;
}

.input-container {
    position: relative;
    margin-bottom: 30px;
    display: flex;
    gap: 10px;
    background: white;
    padding: 10px;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 15px;
    font-size: 16px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    user-select: none;
    cursor: text !important;
}

input::placeholder {
    color: #666;
    opacity: 0.8;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    cursor: text;
}

input:focus {
    outline: none;
    background: white;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

button {
    padding: 15px 30px;
    border: none;
    border-radius: 15px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 60%);
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.5s;
}

button:hover::before {
    transform: translate(-50%, -50%) scale(2);
}

button::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(255, 255, 255, 0.2), transparent);
    clip-path: polygon(0 0, 100% 0, 100% 25%, 0 55%);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 60, 114, 0.3);
}

button:active {
    transform: translateY(1px);
}

.weather-result {
    margin-top: 30px;
    padding: 25px;
    background: rgba(30, 60, 114, 0.05);
    border-radius: 20px;
    line-height: 1.6;
    text-align: left;
}

.weather-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.weather-item {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.weather-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1e3c72, #2a5298);
    opacity: 0;
    transition: opacity 0.3s;
}

.weather-item:hover::before {
    opacity: 1;
}

.weather-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.weather-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: 0.5s;
}

.weather-item:hover::after {
    left: 100%;
}

.weather-item i {
    font-size: 1.5em;
    color: #1e3c72;
    margin-bottom: 10px;
}

.weather-item div {
    margin-top: 8px;
    font-weight: 600;
    color: #000;
    font-size: 1.1em;
}

.weather-description {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 20px;
}

@media (max-width: 480px) {
    .container {
        padding: 25px;
    }

    .input-container {
        flex-direction: column;
    }

    button {
        width: 100%;
    }

    .weather-info {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        width: 85%;
    }
}

.loading-animation {
    display: inline-block;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.weather-icon {
    font-size: 4em;
    margin: 30px 0;
    color: #000;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 5px 8px rgba(0, 0, 0, 0.12));
}

.temperature {
    font-size: 4em;
    font-weight: 700;
    color: #1e3c72;
    margin: 20px 0;
}

.suggestions-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 15px;
    margin-top: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    overflow: hidden;
    cursor: default;
}

.suggestions-container::-webkit-scrollbar {
    width: 6px;
}

.suggestions-container::-webkit-scrollbar-track {
    background: transparent;
}

.suggestions-container::-webkit-scrollbar-thumb {
    background-color: #1e3c72;
    border-radius: 3px;
}

.suggestion-item {
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    user-select: none;
}

.suggestion-item:hover {
    background: #f8f9fa;
    padding-left: 25px;
}

.suggestion-item span:first-child {
    color: #000;
    font-weight: 600;
}

.suggestion-item span:last-child {
    color: #000;
    font-size: 0.9em;
}

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 30px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #1e3c72;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes floatAnimation {
    0% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes glowPulse {
    0% { box-shadow: 0 0 5px rgba(30, 60, 114, 0.2); }
    50% { box-shadow: 0 0 20px rgba(30, 60, 114, 0.4); }
    100% { box-shadow: 0 0 5px rgba(30, 60, 114, 0.2); }
}

.error-message {
    background: #fff1f0;
    color: #ff4d4f;
    padding: 15px 20px;
    border-radius: 10px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 5px 15px rgba(255, 77, 79, 0.1);
}

.error-message::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 100%);
    animation: shine 2s infinite;
}

@keyframes gradientAnimation {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes ripple {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(2); opacity: 0; }
}

.error-message i {
    margin-right: 8px;
    font-size: 1.2em;
}

.loading-text {
    color: #000;
    font-weight: 500;
    margin-top: 10px;
}

.additional-info {
    color: #000;
    font-weight: 500;
}

.additional-info i {
    color: #000;
    margin-right: 8px;
}

.additional-info div {
    color: #000;
    font-weight: 600;
    margin-top: 5px;
}

.weather-icon,
.temperature {
    background-clip: initial;
    -webkit-background-clip: initial;
}

.error-message {
    color: #dc3545;
    font-weight: 500;
}

.loading-text {
    color: #000;
    font-weight: 500;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-18px); }
}

.weather-main {
    background: white;
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.city-name {
    font-size: 2em;
    margin: 15px 0;
    color: #000;
    font-weight: 700;
}

.weather-advice {
    margin: 25px 0;
    padding: 20px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 25px;
}

.advice-item {
    padding: 15px 20px;
    margin: 8px 0;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.9);
    color: #000;
    font-size: 0.95em;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.advice-item i {
    margin-right: 10px;
    color: #1e3c72;
}

.advice-item:hover {
    transform: translateX(8px);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
}

.sun-info {
    display: flex;
    justify-content: space-around;
    margin: 15px 0;
}

.visibility-info {
    text-align: center;
    padding: 15px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 15px;
    margin-top: 15px;
}

.sunrise, .sunset {
    padding: 15px 25px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.sunrise:hover, .sunset:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.weather-icon {
    font-size: 4em;
    margin: 30px 0;
    color: #000;
    animation: float 3s ease-in-out infinite;
}

@media (max-width: 480px) {
    .container {
        width: 92%;
        padding: 30px 25px;
    }
    
    .temperature {
        font-size: 4em;
    }
    
    .weather-item {
        padding: 25px;
    }
    
    .input-container {
        flex-direction: column;
    }
    
    button {
        width: 100%;
        padding: 18px;
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 历史记录按钮样式 */
.history-button {
    padding: 22px 25px;
    border-radius: 25px;
    background: linear-gradient(45deg, #000 30%, #333 70%);
}

/* 历史记录下拉框样式 */
.history-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.98);
    z-index: 1;
}

.clear-history {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 5px 10px;
    font-size: 14px;
    transition: color 0.3s ease;
}

.clear-history:hover {
    color: #dc3545;
}

.history-list {
    padding: 10px 0;
}

.history-item {
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

.history-item .city-name {
    font-weight: 500;
    color: #000;
}

.history-item .query-time {
    font-size: 0.85em;
    color: #666;
}

/* 修改input-container以适应新按钮 */
.input-container {
    position: relative;
}

/* 自定义滚动条 */
.history-dropdown::-webkit-scrollbar {
    width: 6px;
}

.history-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.history-dropdown::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

/* 添加茂名特色样式 */
.maoming-landmarks {
    margin-top: 30px;
    padding: 25px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.maoming-landmarks h3 {
    color: #000;
    font-size: 1.5em;
    margin-bottom: 20px;
    font-weight: 600;
}

.landmarks-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.landmark-item {
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.landmark-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.landmark-item i {
    font-size: 2em;
    color: #1e3c72;
    margin-bottom: 10px;
}

.landmark-item span {
    display: block;
    font-size: 1.1em;
    font-weight: 600;
    color: #000;
    margin: 10px 0;
}

.landmark-item p {
    color: #666;
    font-size: 0.9em;
}

/* 添加动画效果 */
.weather-item, .suggestion-item {
    animation: fadeIn 0.3s ease forwards;
}

/* 修改搜索包装器样式 */
.search-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    cursor: text;
    position: relative;
    background: #f8f9fa;
    border-radius: 15px;
    padding: 5px;
}

/* 修改位置图标样式 */
.location-icon {
    padding-left: 15px;
    color: #666;
    cursor: text;
    flex-shrink: 0;
    z-index: 1;
}

/* 确保输入框内的所有元素都使用文本光标 */
.input-container * {
    cursor: text;
}

/* 只有特定的可点击元素使用指针光标 */
button,
.suggestion-item,
.history-button,
.clear-history {
    cursor: pointer !important;
}

/* 添加输入框包装器样式 */
.input-wrapper {
    position: relative;
    flex: 1;
    margin-right: 5px;
}

/* 修改输入框样式 */
.input-wrapper input {
    width: 100%;
    padding: 12px 15px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    background: transparent;
    transition: all 0.3s ease;
    user-select: none;
    cursor: text !important;
}

/* 添加占位符文本样式 */
.placeholder-text {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    opacity: 0.8;
    pointer-events: none;
    user-select: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    z-index: 0;
}

/* 当输入框获得焦点或有内容时隐藏占位符文本 */
.input-wrapper input:focus + .placeholder-text,
.input-wrapper input:not(:placeholder-shown) + .placeholder-text {
    opacity: 0;
}

/* 移除原有的占位符样式 */
.input-wrapper input::placeholder {
    color: transparent;
}

/* 修改搜索按钮样式 */
#queryButton {
    padding: 12px 15px;
    flex-shrink: 0;
    min-width: 45px;
    border-radius: 10px;
    z-index: 1;
    position: relative;
    margin-left: 5px;
}